<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%>
<% snapshot = grab_attributes(pwd)['snapshot'] -%>
<% gcp_zone = "#{external_attribute(pwd, 'gcp_zone', doc_generation)}" %>
describe google_compute_snapshot(project: <%= gcp_project_id -%>, name: <%= doc_generation ? "'#{snapshot['name']}'" : "snapshot['name']" -%>) do
  it { should exist }
  its('source_disk') { should match <%= doc_generation ? "'#{snapshot['disk_name']}'" : "snapshot['disk_name']" -%> }
end

describe google_compute_snapshot(project: <%= gcp_project_id -%>, name: 'nonexistent') do
  it { should_not exist }
end